## setup ##

# clean environment
rm(list=ls())

# load data
dat <- read.csv2("data_experiment_outcomes_csv.csv",
                 encoding = 'UTF-8')

# outcome variable to numeric
dat$response <- as.numeric(as.character(dat$response))


## models ##

# column 1
mod_1 <- glm(response~immback+partisan, data=dat, family = binomial(link = "logit"))

# column 3
mod_3 <- glm(response~immback*partisan, data=dat, family = binomial(link = "logit"))


## show coefficients and SEs ##
summary(mod_1)
summary(mod_3)


## show log-likelihood ##
logLik(mod_1)
logLik(mod_3)
